Skip to content

fix(cli): domain set also makes the host the site's primary domain - #57

Merged
Madraka merged 1 commit into
mainfrom
fix/domain-set-primary
Oct 21, 2026
Merged

Madraka merged 1 commit into
mainfrom
fix/domain-set-primary

Conversation

@Madraka

@Madraka Madraka commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes #48.

cloudhal domain set <host> only wrote cloudhal.json; Site.domains stayed empty until cloudhal deploy called setPrimaryDomain. Now domain set also makes the host the local site's primary domain (other domains stay, as secondary), so cloudhal dev, render and build use it in canonical links, the sitemap and feeds before any deploy.

The issue's second option — build reading cloudhal.json — already landed in bb0ee69 (astro.build({ site })); this covers the site's own data.

  • packages/cli/src/commands/domain.ts: makePrimary after a set with a site host.
  • test/deploy.test.ts: checks the local site's primary right after domain set, before the deploy.
  • CLI README: the stale "canonical URLs are not rendered yet" sentence.

🤖 Generated with Claude Code

`cloudhal domain set <host>` only wrote cloudhal.json; the site's own
domains stayed empty until a deploy called setPrimaryDomain. It now updates
the local store too, so dev, render and build use the host in canonical
links, the sitemap and feeds before the first deploy. Deploy still does the
same on the deployment.

Closes #48

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka
Madraka merged commit e8b9910 into main Oct 21, 2026
4 checks passed
@Madraka
Madraka deleted the fix/domain-set-primary branch October 21, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

domain set should also set the site's primary domain

1 participant